<?php
require('config.php');
		$catName=$_REQUEST['catName'];
		$sql="select * from `".$oto."_integral_cats` where `catFlag`='1' and catName='{$catName}'";
		$result=$db->query($sql);
		while($row=$result->fetch_assoc()){
			$cat_info[]=$row;//将取得的所有数据赋值给person_info数组
		}
		if(!isset($cat_info))
		{

		}
		else
		{
			$catId=$cat_info[0]['catId'];
			$sql="select * from `".$oto."_integral` where `goodsFlag`='1' and `isSale`='1' and `goodsCatId`='{$catId}' order by saleCount DESC";
			$result=$db->query($sql);
			while($row=$result->fetch_assoc()){
				$person_info[]=$row;//将取得的所有数据赋值给person_info数组
			}
		}
		echo json_encode($person_info);
?>